<template>
	<div class="productinfo-box">
		<div class="pinfo-box">
			<el-row>
				<el-col :span="4" style="text-align: right;">赠送积分：</el-col>
				<el-col :span="20"><el-input type="text" v-model="product.giftPoint"  size="small" class="iptext"/></el-col>
			</el-row>
			<el-row>
				<el-col :span="4" style="text-align: right;">赠送成长值：</el-col>
				<el-col :span="20"><el-input v-model="product.giftGrowth" type="text" size="small" class="iptext" /></el-col>
			</el-row>
			<el-row>
				<el-col :span="4" style="text-align: right;">积分购买限制：</el-col>
				<el-col :span="20"><el-input type="text" v-model="product.usePointLimit" size="small" class="iptext" /></el-col>
			</el-row>
			<el-row>
				<el-col :span="4" style="text-align: right;">预告商品：</el-col>
				<el-col :span="20">
					<el-switch size="small" v-model="product.previewStatus" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949" />
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="4" style="text-align: right;">商品上架：</el-col>
				<el-col :span="20">
					<el-switch size="small" v-model="product.publishStatus" active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949" />
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="4" style="text-align: right;">商品推荐：</el-col>
				<el-col :span="20">
					新品:
					<el-switch size="small" v-model="product.newStatus" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949" />
					推荐:
					<el-switch size="small" v-model="product.recommandStatus" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949" />
				</el-col>	
			</el-row>
			<el-row>
				<el-col :span="4" style="text-align: right;">服务保证：</el-col>
				<el-col :span="20">
					 <el-checkbox-group v-model="serviceIds">
					    <el-checkbox label="1">无忧退货</el-checkbox>
					    <el-checkbox label="2">快速退款</el-checkbox>
					    <el-checkbox label="3">免费包邮</el-checkbox>
					  </el-checkbox-group>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="4" style="text-align: right;">详细页标题：</el-col>
				<el-col :span="20"><el-input type="text" v-model="product.detailTitle" size="small" class="iptext"/></el-col>
			</el-row>
			<el-row>
				<el-col :span="4" style="text-align: right;">详细页描述：</el-col>
				<el-col :span="20"><el-input type="text" size="small" v-model="product.detailDesc" class="iptext"/></el-col>
			</el-row>
			<el-row>
				<el-col :span="4" style="text-align: right;">商品关键字：</el-col>
				<el-col :span="20"><el-input type="text" size="small" v-model="product.keywords" class="iptext" /></el-col>
			</el-row>
			<el-row>
				<el-col :span="4" style="text-align: right;">商品备注：</el-col>
				<el-col :span="20"><el-input type="text" v-model="product.note" size="small" class="iptext" /></el-col>
			</el-row>
			<el-row>
				<el-col :span="4" style="text-align: right;">选择优惠方式：</el-col>
				<el-col :span="20"></el-col>
			</el-row>
		</div>
		<div class="btn-box">
			<el-button size="small" type="primary" @click="$emit('input',0)">上一步，填写商品信息</el-button>
			<el-button size="small" type="primary" @click="$emit('input',2)">下一步，填写商品属性</el-button>
		</div>
	</div>
</template>

<script>
	export default{
		props:['value','product'],
		data(){
			return{
				serviceIds:[]
			}
		},
		watch:{
			serviceIds(){
				this.product.serviceIds = this.serviceIds.join(",");
			}
		}
	}
</script>

<style lang="scss">
	.productinfo-box{
		font-size:13px;
		.btn-box{
			text-align: center;
		}
	}
</style>
